<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // 字符串的基本方法
        //   charAt(i)  方括号是一样的 , 通过下标访问字符串的值
        //   charCodeAt(i)  通过下标访问字符串的值对应的ASCII值
        //   String.fromCharCode(n)  返回一个数字(ASCII值)对应的字符  


        var str = 'hello' ;
        console.log(str.charAt(3));   // h
        console.log(str[3]); 

        console.log(str.charCodeAt(0));


        console.log(String.fromCharCode(104));



        var bigArr = [] ;
        for(var i = 65 ; i <= 90 ; i++) {
            var s = String.fromCharCode(i) ;
            bigArr.push(s) ;
        }
        console.log(bigArr);


        var smallArr = [] ;
        for(var i = 97 ; i <= 122 ; i++) {
            var s = String.fromCharCode(i) ;
            smallArr.push(s) ;
        }
        console.log(smallArr);




    </script>
    
</body>
</html>